{extend name="common/base"/}
<!-- 主体 -->
{block name="body"}
	<form class="layui-form p-4">
		<h3 class="pb-3">新建积分订单</h3>
		<table class="layui-table layui-table-form">
			<tr><td class="layui-td-gray-2">用户ID<font>*</font></td>
			<td><input type="text" name="uid"  lay-verify="required" lay-reqText="请完善用户ID" value="" autocomplete="off" placeholder="请输入用户ID" class="layui-input"></td><td class="layui-td-gray-2">订单号<font>*</font></td>
			<td><input type="text" name="order_no"  lay-verify="required" lay-reqText="请完善订单号" value="" autocomplete="off" placeholder="请输入订单号" class="layui-input"></td><td class="layui-td-gray-2">商品ID<font>*</font></td>
			<td><input type="text" name="goods_id"  lay-verify="required" lay-reqText="请完善商品ID" value="" autocomplete="off" placeholder="请输入商品ID" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">支付金额<font>*</font></td>
			<td><input type="text" name="amount"  lay-verify="required" lay-reqText="请完善支付金额" value="" autocomplete="off" placeholder="请输入支付金额" class="layui-input"></td><td class="layui-td-gray-2">买家备注<font>*</font></td>
			<td><input type="text" name="remark"  lay-verify="required" lay-reqText="请完善买家备注" value="" autocomplete="off" placeholder="请输入买家备注" class="layui-input"></td><td class="layui-td-gray-2">商品名称<font>*</font></td>
			<td><input type="text" name="goods_info"  lay-verify="required" lay-reqText="请完善商品名称" value="" autocomplete="off" placeholder="请输入商品名称" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">支付时间<font>*</font></td>
			<td><input type="text" name="pay_time"  lay-verify="required" lay-reqText="请完善支付时间" value="" autocomplete="off" placeholder="请输入支付时间" class="layui-input"></td><td class="layui-td-gray-2">运费<font>*</font></td>
			<td><input type="text" name="yun"  lay-verify="required" lay-reqText="请完善运费" value="" autocomplete="off" placeholder="请输入运费" class="layui-input"></td><td class="layui-td-gray-2">支付状态:1待收货,2已完成<font>*</font></td>
			<td><input type="text" name="status"  lay-verify="required" lay-reqText="请完善支付状态:1待收货,2已完成" value="" autocomplete="off" placeholder="请输入支付状态:1待收货,2已完成" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">收货地址<font>*</font></td>
			<td><input type="text" name="address"  lay-verify="required" lay-reqText="请完善收货地址" value="" autocomplete="off" placeholder="请输入收货地址" class="layui-input"></td><td class="layui-td-gray-2">是否发货：0否 1是<font>*</font></td>
			<td><input type="text" name="is_send"  lay-verify="required" lay-reqText="请完善是否发货：0否 1是" value="" autocomplete="off" placeholder="请输入是否发货：0否 1是" class="layui-input"></td><td class="layui-td-gray-2">快递ID<font>*</font></td>
			<td><input type="text" name="express_id"  lay-verify="required" lay-reqText="请完善快递ID" value="" autocomplete="off" placeholder="请输入快递ID" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">快递<font>*</font></td>
			<td><input type="text" name="express"  lay-verify="required" lay-reqText="请完善快递" value="" autocomplete="off" placeholder="请输入快递" class="layui-input"></td><td class="layui-td-gray-2">快递单号<font>*</font></td>
			<td><input type="text" name="express_num"  lay-verify="required" lay-reqText="请完善快递单号" value="" autocomplete="off" placeholder="请输入快递单号" class="layui-input"></td><td class="layui-td-gray-2">发货时间<font>*</font></td>
			<td><input type="text" name="send_time"  lay-verify="required" lay-reqText="请完善发货时间" value="" autocomplete="off" placeholder="请输入发货时间" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">设备ID<font>*</font></td>
			<td><input type="text" name="deviceId"  lay-verify="required" lay-reqText="请完善设备ID" value="" autocomplete="off" placeholder="请输入设备ID" class="layui-input"></td><td class="layui-td-gray-2">订单类型：1实物 2虚拟物品<font>*</font></td>
			<td><input type="text" name="order_type"  lay-verify="required" lay-reqText="请完善订单类型：1实物 2虚拟物品" value="" autocomplete="off" placeholder="请输入订单类型：1实物 2虚拟物品" class="layui-input"></td><td class="layui-td-gray-2">使用时间<font>*</font></td>
			<td><input type="text" name="confirm_time"  lay-verify="required" lay-reqText="请完善使用时间" value="" autocomplete="off" placeholder="请输入使用时间" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">下单时间<font>*</font></td>
			<td><input type="text" name="create_time"  lay-verify="required" lay-reqText="请完善下单时间" value="" autocomplete="off" placeholder="请输入下单时间" class="layui-input"></td><td class="layui-td-gray-2">编辑时间<font>*</font></td>
			<td><input type="text" name="update_time"  lay-verify="required" lay-reqText="请完善编辑时间" value="" autocomplete="off" placeholder="请输入编辑时间" class="layui-input"></td><td colspan='2'></td>
		</tr>
		</table>
		<div class="pt-3">
			<input type="hidden" name="id" value="0"/>
			<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
	<script>
		var moduleInit = ['tool'];

			function gouguInit() {
			var form = layui.form, tool = layui.tool;
			var layer = layui.layer;
			var element = layui.element;
			
			
			
			//监听提交
			form.on('submit(webform)', function (data) {
			
			let callback = function (e) {
			layer.msg(e.msg);
			if (e.code == 0) {
			tool.sideClose(1000);
		}
		}
			tool.post("/admin/score_order/add", data.field, callback);
			return false;
		});
		}

	</script>
{/block}
<!-- /脚本 -->